<?php global $options; foreach ($options as $value) {if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }}?>
<?php get_header(); ?>


<div class="main_big_cat_top_3">
</div>

<div class="main_cats_blog" id="archivelist">
<form name="archiveform" action="">
<select name="archive_chrono" onchange="window.location = (document.forms.archiveform.archive_chrono[document.forms.archiveform.archive_chrono.selectedIndex].value);"> 
<option value=''>By Month</option>
<?php get_archives('','','option', 1); ?>
</select> 
</form>

<table id="archive" cellpadding="0" cellspacing="0">
  <thead>
  <tr>
    <th class="nosort">Image</th>
    <th>Title</th>
    <th>Date</th>
    <th>Category</th>
    <th>Author</th>
	<th>Responses</th>
  </tr>
  </thead>

	 
			 <?php while (have_posts()) : the_post(); if (current_user_can('level_2')) {} else {if (in_category('private')) continue;}
			 if ($images = get_children(array(
				'post_parent' => $post->ID,
				'numberposts' => '1',
				'post_type' => 'attachment',
				'post_mime_type' => 'image',
				'order' => 'ASC',
				'orderby' => 'menu_order')))  
			 foreach($images as $image) {  
				$viso_image = $image->guid; 
				$viso_thumb = wp_get_attachment_thumb_url( $image->ID);			
				} else {
				$viso_image = site_url('/wp-content/themes/exehill2/images/mini_noimage.png');
				$viso_thumb = site_url('/wp-content/themes/exehill2/images/mini_noimage.png');}	?>	


		<tr><td><img src="<?php echo $viso_thumb; ?>" alt="<?php the_title(); ?>" style="width:20px; height:20px; " border="0"/></td><td> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></td><td><?php the_time('F jS, Y'); ?></td><td><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?></td><td><?php the_author(); ?></td><td><?php comments_popup_link('0 Responses', '1 Responses', '% Responses'); ?></td></tr>

		
		
<?php endwhile; ?>


			</table>

<script type="text/javascript">
window.addEvent( 'domready', function(){
  new SortingTable( 'archive' );
});
</script>
	
	<div class="clear">
	</div>
	

	

	
	
</div>	
	<div class="main_left_bottom_3"><?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
	</div>
<?php get_footer(); ?>
